From 01c15ccf8168c0a4c636c1312eae28d66e7382f0 Mon Sep 17 00:00:00 2001 From: Greg Sabino Mullane Date: Sat, 12 Aug 2006 19:40:33 +0000 Subject: [PATCH] Fix some spacing, ensure that we do not reset the superuser name if loading the page the second time. --- config/index.php | 56 ++++++++++++++++++++++++++---------------------- 1 file changed, 30 insertions(+), 26 deletions(-) diff --git a/config/index.php b/config/index.php index 1b8d5b8fa9..e815ea9119 100644 --- a/config/index.php +++ b/config/index.php @@ -151,16 +151,16 @@ $ourdb['postgres']['rootuser'] = 'postgres'; ?> } - function toggleDBarea(id) { + function toggleDBarea(id,defaultroot) { hideall(); var dbarea = document.getElementById(id).style; dbarea.display = (dbarea.display == 'none') ? 'block' : 'none'; var db = document.getElementById('RootUser'); - } - ?> - } // --> @@ -412,14 +412,14 @@ if ($conf->apc ) { $conf->eaccel = function_exists( 'eaccelerator_get' ); if ( $conf->eaccel ) { - $conf->turck = 'eaccelerator'; - print "
  • eAccelerator installed
  • \n"; + $conf->turck = 'eaccelerator'; + print "
  • eAccelerator installed
  • \n"; } if( !$conf->turck && !$conf->eaccel && !$conf->apc ) { echo( '
  • Couldn\'t find Turck MMCache, - eAccelerator or - APC. Object caching functions cannot be used.
  • ' ); + eAccelerator or + APC. Object caching functions cannot be used.' ); } $conf->diff3 = false; @@ -492,8 +492,8 @@ print "
  • Environment check $conf->SysopName = importPost( "SysopName", "WikiSysop" ); $conf->SysopPass = importPost( "SysopPass" ); $conf->SysopPass2 = importPost( "SysopPass2" ); - $conf->RootUser = importPost( "RootUser", "root" ); - $conf->RootPW = importPost( "RootPW", "-" ); + $conf->RootUser = importPost( "RootUser", "root" ); + $conf->RootPW = importPost( "RootPW", "-" ); ## MySQL specific: $conf->DBprefix = importPost( "DBprefix" ); @@ -618,7 +618,7 @@ if( $conf->posted && ( 0 == count( $errs ) ) ) { require_once( "maintenance/InitialiseMessages.inc" ); $wgTitle = Title::newFromText( "Installation script" ); -error_reporting( E_ALL ); + error_reporting( E_ALL ); print "
  • Loading class: $dbclass"; $dbc = new $dbclass; @@ -699,7 +699,7 @@ error_reporting( E_ALL ); $wgDatabase = $dbc->newFromParams($wgDBserver, $wgDBsuperuser, $conf->RootPW, "postgres", 1); if (!$wgDatabase->isOpen()) { print " error: " . $wgDatabase->lastError() . "
  • \n"; - $errs["DBserver"] = "Couldn't connect to database as superuser"; + $errs["DBserver"] = "Could not connect to database as superuser"; $errs["RootUser"] = "Check username"; $errs["RootPW"] = "and password"; continue; @@ -724,7 +724,7 @@ error_reporting( E_ALL ); if( version_compare( $myver, "4.0.14" ) < 0 ) { dieout( " -- mysql 4.0.14 or later required. Aborting." ); } - $mysqlNewAuth = version_compare( $myver, "4.1.0", "ge" ); + $mysqlNewAuth = version_compare( $myver, "4.1.0", "ge" ); if( $mysqlNewAuth && $mysqlOldClient ) { print "; You are using MySQL 4.1 server, but PHP is linked to old client libraries; if you have trouble with authentication, see @@ -820,11 +820,11 @@ error_reporting( E_ALL ); print "
  • Initializing data..."; $wgDatabase->insert( 'site_stats', - array( 'ss_row_id' => 1, - 'ss_total_views' => 0, - 'ss_total_edits' => 0, - 'ss_good_articles' => 0 ) ); - + array ( 'ss_row_id' => 1, + 'ss_total_views' => 0, + 'ss_total_edits' => 0, + 'ss_good_articles' => 0 ) ); + # Set up the "regular user" account *if we can, and if we need to* if( $conf->Root and $conf->DBtype == 'mysql') { # See if we need to @@ -840,7 +840,7 @@ error_reporting( E_ALL ); echo( "success.
  • " ); } } - + if( $conf->SysopName ) { $u = User::newFromName( $conf->getSysopName() ); if ( 0 == $u->idForName() ) { @@ -878,7 +878,7 @@ error_reporting( E_ALL ); /* Write out the config file now that all is well */ print "

    Creating LocalSettings.php...

    \n\n"; - $localSettings = "<" . "?php$endl$local$endl?" . ">"; + $localSettings = "<" . "?php$endl$local$endl?" . ">"; // Fix up a common line-ending problem (due to CVS on Windows) $localSettings = str_replace( "\r\n", "\n", $localSettings ); @@ -1172,7 +1172,7 @@ if( count( $errs ) ) { ?>

    The username specified above will have it's search path set to the above schemas, - so it is recommended that you create a new user.

    + so it is recommended that you create a new user.

    @@ -1201,7 +1201,11 @@ if( count( $errs ) ) { @@ -1352,7 +1356,7 @@ if ( \$wgCommandLineMode ) { \$wgSitename = \"{$slconf['Sitename']}\"; -\$wgScriptPath = \"{$slconf['ScriptPath']}\"; +\$wgScriptPath = \"{$slconf['ScriptPath']}\"; \$wgScript = \"\$wgScriptPath/index.php\"; \$wgRedirectScript = \"\$wgScriptPath/redirect.php\"; @@ -1504,7 +1508,7 @@ function aField( &$conf, $field, $text, $type = "text", $value = "", $onclick = } echo "\t\t